<template>
  <div class="main-page">
    <!-- 表单 -->
    <el-form>
      <el-card class="box-card"
               style="border: 0px;">
        <div slot="header"
             class="clearfix">
          <span>同步设置</span>
        </div>
        <div class="text">
          <el-button @click="drugSync">同步药品</el-button>
          <el-button @click="routeSync">同步给药方式</el-button>
          <el-button @click="diseaseSync">同步诊断信息</el-button>
          <el-button @click="allergenSync">同步过敏源</el-button>
          <el-button @click="frequencySync">同步频次信息</el-button>
          <el-button @click="deptSync">同步科室信息</el-button>
          <el-button @click="doctorSync">同步医生信息</el-button>
          <el-button @click="operationSync">同步手术信息</el-button>
          <el-button @click="Route">临床给药途径同步</el-button>
        </div>
      </el-card>
      <el-card class="box-card"
               style="border: 0px;">
        <div slot="header"
             class="clearfix">
          <span>配对设置</span>
        </div>
        <div class="text">
          <el-button @click="drugMatch">药品配对</el-button>
          <el-button @click="diseaseMatch">诊断配对</el-button>
          <el-button @click="allergenMatch">过敏源配对</el-button>
          <el-button @click="routeMatch">给药途径配对</el-button>
        </div>
      </el-card>
    </el-form>
  </div>
</template>

<script>

import { drugSync, routeSync, diseaseSync, allergenSync, frequencySync, doctorSync, operationSync, Route, drugMatch, diseaseMatch, allergenMatch, routeMatch } from "@/api/rad"
export default {
  name: "MainPage",
  components: {
  },
  methods: {
    async drugSync () {
      let res = await this.$rad.drugSync()
      console.log(res)
    },
    async routeSync () {
      let res = await this.$rad.routeSync()
      console.log(res)
    },
    async diseaseSync () {
      let res = await this.$rad.diseaseSync()
      console.log(res)
    },
    async allergenSync () {
      let res = await this.$rad.allergenSync()
      console.log(res)
    },
    async frequencySync () {
      let res = await this.$rad.frequencySync()
      console.log(res)
    },
    async deptSync () {
      let res = await this.$rad.deptSync()
      console.log(res)
    },
    async doctorSync () {
      let res = await this.$rad.doctorSync()
      console.log(res)
    },
    async operationSync () {
      let res = await this.$rad.operationSync()
      console.log(res)
    },
    async Route () {
      let res = await this.$rad.Route()
      console.log(res)
    },
    async drugMatch () {
      let res = await this.$rad.drugMatch()
      console.log(res)
    },
    async diseaseMatch () {
      let res = await this.$rad.diseaseMatch()
      console.log(res)
    },
    async allergenMatch () {
      let res = await this.$rad.allergenMatch()
      console.log(res)
    },
    async routeMatch () {
      let res = await this.$rad.routeMatch()
      console.log(res)
    },
  },
  data () {
    return {

    };
  }
};
</script>
<style scoped>
.main-page .box-card {
  margin: 10px 20px 10px 10px;
  height: 92px;
}
.box-card >>> .el-card__header {
  padding: 8px 10px;
  background: #dddddd;
}
.el-card >>> .el-card__body {
  padding: 8px 10px;
}
</style>
